﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace ExtractingWords
{
    class Extraction
    {
        static void Main(string[] args)
        {
            string text = "this is sample test. Testing is important to test everything.";
            string pattern = "test[a-z]*";
            Match match = Regex.Match(text, pattern,RegexOptions.IgnoreCase);
            while (match.Success)
            {
                Console.WriteLine(match);
                match = match.NextMatch();
            }

        }
    }
}
